﻿<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<%option explicit%>
<%
Dim RZ_IN
RZ_IN=1
%>
<!--#include file="../conn.inc.asp" -->
<!--#include file="admin_inc/admin.function.asp" -->
<!--#include file="admin_inc/admin.sqlfunction.asp" -->
<%
checkadmin(1)
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link type="text/css" href="style/style.css" rel="stylesheet" rev="stylesheet"/>
<script type="text/javascript" language="javascript" src="admin_js/common.js"></script>
<script type="text/javascript" language="javascript" src="admin_js/net.js"></script>
<title>广告列表</title>
</head>
<body>
<div id="prevAD" style="position:absolute;display:none; left:50px; top:100px;background:#FFFFFF;border:#6699FF 1px solid; color:#134360; padding:6px;"></div>
<div class="addrecord"><ul><li><a href="advertise_add.asp">添加广告</a></li></ul></div>
<div class="tdcenter"><a href="advertise_list.asp">全部</a>&nbsp;&nbsp;<a href="?adtype=1">文本广告</a>&nbsp;&nbsp;<a href="?adtype=2">图片广告</a>&nbsp;&nbsp;<a href="?adtype=3">Flash广告</a>&nbsp;&nbsp;<a href="?adtype=4">代码广告</a></div>
<form name="rzform"  id="rzform" action="batch_delete.asp" method="post">
<input type="hidden" name="listtype" value="ad"/>
<table  cellspacing="0" cellpadding="0" class="table_800">
<tr>
<th class='tdcenter' width="30">选择</th>
<th class='tdcenter' width="20">ID</th>
<th class='tdcenter' width="30">类型</th>
<th class='tdcenter'>提示文字</th>
<th class='tdcenter' width="65">有效时间起</th>
<th class='tdcenter' width="65">有效时间止</th>
<th class='tdcenter' width="35">宽度</th>
<th class='tdcenter' width="35">高度</th>
<th class='tdcenter'>操作</th>
</tr>
<%
dim page,sql,MyPage,rs,ad_type,theadtype
ad_type=HTMLEncode(request.QueryString("adtype"))
page=GetIntQueryString("page")
If ad_type<>"" Then
sql="select * from c_advertise where ad_type="&ad_type&" order by id desc"
Else 
sql="select * from c_advertise order by id desc"
End If 
if page<=1 then
page = 1
end if
Set MyPage = New RZPage
MyPage.SetSQL = sql
MyPage.PageSize = 20
MyPage.SetCss_PreNext="nextprev"
MyPage.SetCss_NumPage="pagenum"
MyPage.SetCss_CurrentPage="currentpage"
Set rs = MyPage.GetRS()
dim i
For i=1 To MyPage.PageSize
If Not rs.EOF Then 
%> 
<tr  class="row">
<td class='tdcenter'><input type="checkbox" name="id" id="id" value="<%=rs("id")%>" onclick="chkRow(this);"/></td>
<td>
<%=rs("id")%>
</td>
<td class='tdcenter'>
<%
theadtype=rs("ad_type")
select case theadtype
case 1:
response.Write("文本")
case 2:
response.Write("图片")
case 3:
response.Write("Flash")
case 4:
response.Write("代码")
end select
%>
</td>
<td><%=rs("ad_alt")%></td>
<td class='tdcenter'><%=rs("ad_begintime")%></td>
<td class='tdcenter'><%=rs("ad_endtime")%></td>
<td class='tdcenter'><%If rs("ad_type")=2 Or rs("ad_type")=3 then%><%=rs("ad_imgswf_width")%>px<%else%>&nbsp;<%End if%></td>
<td class='tdcenter'><%If rs("ad_type")=2 Or rs("ad_type")=3 then%><%=rs("ad_imgswf_height")%>px<%else%>&nbsp;<%End if%></td>
<td class='tdcenter'>
<a href="advertise_add.asp?id=<%=rs("id")%>"><img src='images/modify.gif' alt='修改' border='0'/></a>&nbsp;<a href="advertise_delete.asp?id=<%=rs("id")%>" onclick="return confirm('您确定要删除吗？');"><img src='images/delete.gif' alt='删除' border='0'/></a>&nbsp;<a href="advertise_preview.asp?id=<%=rs("id")%>" target="_blank">预览</a>
&nbsp;
</td>
</tr>
<%
rs.Movenext
Else
Exit For
End If
Next
%>
<tr class="row">
<td colspan="9" class="tdcenter">
<input name="selectall" type="checkbox" id="selectall" value="" onclick="selectAll();" />全选&nbsp;&nbsp;&nbsp;<input type="button"  class="btn" name="del" onclick="deleteselect();" value="批量删除"/>
</td>
</tr>
</table>
</form>
<div id="bottompage">
<%MyPage.ShowPage()%>
<span class="recordcount">
<%MyPage.ShowPageInfo()%>
</span>
</div>
</body>
</html>
